<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>CruiseControl.NET : Artifact Cleanup Publisher</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            CruiseControl.NET : Artifact Cleanup Publisher
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jun 26, 2009 by <font color="#0050B2">csut017</font>.
				    </div>

				    <p>The artifact CleanUp publisher allows for automatic removal of the buildlogs according to the choosen setting. It relies on the build log folder, so the XML publisher must be specified before this publisher can run. For technical reasons this publisher MUST reside in the publisher section, it will not work in the tasks section. Be sure to specify the XMLLogger before this one.</p>

<h4><a name="ArtifactCleanupPublisher-Example"></a>Example</h4>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">&lt;artifactcleanup cleanUpMethod=<span class="code-quote">"KeepLastXBuilds"</span> cleanUpValue=<span class="code-quote">"50"</span> /&gt;</pre>
</div></div>
<p>This will keep the last 50 builds in the buildlog folder.</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Node </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Required </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Version </th>
</tr>
<tr>
<td class='confluenceTd'> cleanUpMethod </td>
<td class='confluenceTd'> Defines the procedure to use for cleaning up the artifact folder </td>
<td class='confluenceTd'> complex </td>
<td class='confluenceTd'> true <br clear="all" /> </td>
<td class='confluenceTd'> N/A </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> cleanUpValue </td>
<td class='confluenceTd'> Defines the value for the cleanup procedure </td>
<td class='confluenceTd'> int <br clear="all" /> </td>
<td class='confluenceTd'> true <br clear="all" /> </td>
<td class='confluenceTd'> N/A <br clear="all" /> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> description </td>
<td class='confluenceTd'> If filled in, this will be shown in the buildstage as the process name <br clear="all" /> </td>
<td class='confluenceTd'> string <br clear="all" /> </td>
<td class='confluenceTd'> false <br clear="all" /> </td>
<td class='confluenceTd'> n/a </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> dynamicValues </td>
<td class='confluenceTd'> Any dynamic parameters to be used. See <a href="Dynamic Parameters.html" title="Dynamic Parameters">Dynamic Parameters</a> </td>
<td class='confluenceTd'> Dynamic values array - see <a href="Dynamic Parameters.html" title="Dynamic Parameters">Dynamic Parameters</a> </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>None</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
</tbody></table>

<p>Supported cleaning up methods :</p>
<ul>
	<li>KeepLastXBuilds : keeps the last specified amount of builds</li>
	<li>DeleteBuildsOlderThanXDays&nbsp; : Deletes the builds older than the specifed amount of days</li>
	<li>KeepMaximumXHistoryDataEntries : Clears the History Data file (for the ModificationHistory), keeping maximum the specified amount of builds.</li>
	<li>DeleteSubDirsOlderThanXDays : Deletes subfolders of the artifact folder if they are older than the specified amount of days. (Buildlogfolder excluded)</li>
	<li>KeepLastXSubDirs : Keeps the last specified amount of subfolders in the artifacts folder, sorting is done on creation time of the folder (Buildlogfolder excluded)
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>DeleteSubDirsOlderThanXDays</b> and <b>KeepLastXSubDirs</b> are mainly meant for cleaning up published builds (done via the <a href="Build Publisher.html" title="Build Publisher">Build Publisher</a>)</td></tr></table></div></li>
</ul>


				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Sep 29, 2009 20:59</font></td>
		    </tr>
	    </table>
    </body>
</html>